import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wangxin
 * Date: 2024-07-22
 * Time: 21:12
 */
public class test {



        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String str = sc.nextLine();
            str = str + "a" + "";
            String temp = "";
            String result = "";
            for(int i = 0; i  < str.length();i++){
                char ch = str.charAt(i);
                if(ch >= '0'&&ch <= '9'){
                    temp = temp + ch + "";
                }
                else{
                    if(temp.length() > result.length()){
                        result = temp;
                    }
                    temp = "";
                }

            }
            System.out.println(result);
        }


}
